package com.danskin.wechat.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.danskin.wechat.entity.WxFansCard;
import com.danskin.wechat.entity.example.WxFansCardExample;
import com.danskin.wechat.util.Page;
import com.danskin.wechat.vo.WxFansCardDetailVo;
import com.danskin.wechat.vo.WxFansCardVo;
import com.danskin.wechat.vo.WxMenuClickDetailVo;

public interface WxFansCardDao {

	/**
	 * 根据时间查询微信原生卡领取统计
	 * 
	 * @param mpId
	 * @param paramStartTime
	 * @param paramEndTime
	 * @return
	 * @author makunsmac
	 */
	List<WxFansCardVo> selectWxFansCardList(Map map);

	/**
	 * 根据时间查询微信原生卡领取详情
	 * 
	 * @param page
	 * @return
	 * @author makunsmac
	 */
	List<WxFansCardDetailVo> listPageWxFansCardDetailList(Page page);

	/**
	 * 根据时间查询微信原生卡领取详情（用于导出）
	 * 
	 * @param page
	 * @return
	 * @author makunsmac
	 */
	List<WxFansCardDetailVo> selectWxFansCardDetailList(Map map);

	int countByExample(WxFansCardExample example);

	int deleteByExample(WxFansCardExample example);

	int deleteByPrimaryKey(Integer id);

	int insert(WxFansCard record);

	int insertSelective(WxFansCard record);

	List<WxFansCard> selectByExample(WxFansCardExample example);

	WxFansCard selectByPrimaryKey(Integer id);

	WxFansCard queryByOpenIdAndCardId(@Param("openId") String openId, @Param("wxCardId") String wxCardId,
			@Param("userCardCode") String userCardCode);

	WxFansCard selectMemberCardIdByOpenId(@Param("mpId") Integer mpId, @Param("openId") String openId);

	int updateByExampleSelective(@Param("record") WxFansCard record, @Param("example") WxFansCardExample example);

	int updateByExample(@Param("record") WxFansCard record, @Param("example") WxFansCardExample example);

	int updateByPrimaryKeySelective(WxFansCard record);

	int updateByPrimaryKey(WxFansCard record);

	Integer countByOpenIdActived(@Param("appId") String appId, @Param("openId") String openId,
			@Param("cardType") String cardType);
}